Skip to content

fix: reject invalid block ranges when creating NewFilter#1016

Open
mmsqe wants to merge 1 commit intocosmos:mainfrom
mmsqe:align_filter
Open

fix: reject invalid block ranges when creating NewFilter#1016
mmsqe wants to merge 1 commit intocosmos:mainfrom
mmsqe:align_filter

Conversation

@mmsqe
Copy link
Copy Markdown
Collaborator

@mmsqe mmsqe commented Feb 24, 2026

Description

reject invalid block range params when fromBlock > toBlock like

{
  "jsonrpc": "2.0",
  "method": "eth_newFilter",
  "params": [
    {
      "fromBlock": "0x20",
      "toBlock": "0x10",
      "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
      "topics": []
    }
  ],
  "id": 2
}

Closes: #XXXX


Author Checklist

All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.

I have...

  • tackled an existing issue or discussed with a team member
  • left instructions on how to review the changes
  • targeted the main branch

@codecov
Copy link
Copy Markdown

codecov bot commented Feb 24, 2026

Codecov Report

❌ Patch coverage is 94.11765% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 65.76%. Comparing base (0310aa9) to head (84db0fb).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
rpc/namespaces/ethereum/eth/filters/api.go 94.11% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1016      +/-   ##
==========================================
+ Coverage   65.37%   65.76%   +0.38%     
==========================================
  Files         319      319              
  Lines       22223    22204      -19     
==========================================
+ Hits        14528    14602      +74     
+ Misses       6505     6449      -56     
+ Partials     1190     1153      -37     
Files with missing lines Coverage Δ
rpc/namespaces/ethereum/eth/filters/api.go 27.09% <94.11%> (+19.81%) ⬆️

... and 6 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant